//
//  ACDiskStorage.h
//  ACCache_Example
//
//  Created by autohome on 2021/8/7.
//  Copyright © 2021 CaiXiang. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface ACDiskStorage : NSObject

@property (nonatomic, assign) NSTimeInterval effectiveCacheTime;

+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;

- (nullable instancetype)initWithPath:(NSString *)path;

- (BOOL)saveCacheData:(NSData *)data forKey:(NSString *)cacheKey;
- (BOOL)saveCacheDatas:(NSArray <NSData *>*)datas forKey:(NSArray<NSString *> *)cacheKeys;

- (NSData *)selectCacheData:(NSString *)cacheKey;

- (BOOL)deleteAllCacheData;
- (BOOL)deleteCacheData:(NSString *)cacheKey;
- (BOOL)existsCacheWithCacheKey:(NSString *)cacheKey;

- (void)removeExpiredCache;

@end

NS_ASSUME_NONNULL_END
